package com.plume.toolbox.plus.ui.home;

import android.app.AlertDialog;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;

import com.plume.toolbox.plus.UserInfoSaver;
import com.plume.toolbox.plus.databinding.FragmentHomeBinding;
import com.plume.toolbox.plus.jni.PlumeNative;

public class HomeFragment extends Fragment {

    public void 大牛大牛求你别逆向了1(){}
    public void 大牛大牛求你别逆向了2(){}
    public void 大牛大牛求你别逆向了3(){}

    private FragmentHomeBinding binding;

    public View onCreateView(@NonNull LayoutInflater inflater,
                             ViewGroup container, Bundle savedInstanceState) {

        binding = FragmentHomeBinding.inflate(inflater, container, false);
        View root = binding.getRoot();

        final TextView textView = binding.isLoginText;
        final TextView nativeVersionText=binding.nativeVersionText;
        
        if(UserInfoSaver.checkLoginStatus(getActivity())){
            textView.setText("当前已登录："+UserInfoSaver.loadUserName(getActivity()));
        }
        nativeVersionText.setText("PlumeNative版本："+PlumeNative.getVersion());
        
        return root;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        binding = null;
    }
    
}